export class EffectHelper {

    //漂浮
    public static piaofu(node: cc.Node) {
        cc.tween(node)
            .repeatForever(
                cc.tween(node)
                    .by(1, { y: 10 }, { progress: null, easing: cc.easing.fade })
                    .by(1, { y: -10 }, { progress: null, easing: cc.easing.fade })
            ).start()
    }

    public static breath(node: cc.Node){
        cc.tween(node)
        .repeatForever(
            cc.tween()
                .to(2,{opacity:120},{progress:null,easing:cc.easing.backInOut})
                .to(2,{opacity:255},{progress:null,easing:cc.easing.backInOut})
        ).start();
    }

    public static rotationMv(node: cc.Node){
        cc.tween(node)
        .repeatForever(
            cc.tween()
                .to(360,{angle:-3600})
                .start()
        ).start();
    }

}